# -*- coding:utf-8 -*-
# @FileName  :ent_own_report.py
# @Time      :2020/12/17 10:26
# @Author    :Zhoujirong
# @Desc      :
from common.http_request import Request
from biz.support.urls import ServerUrl

class EntOwnReportRequest:
    @classmethod
    def get_page(cls,curPage,
            maxSize,
            search_EQ_enterpriseName,
            search_EQ_signCode,
            search_EQ_uniformSocialCredCode,
            search_EQ_orgInstCode,
            search_EQ_qryReason,
            search_EQ_queryType,
            search_EQ_source,
            search_EQ_status,
            search_EQ_queryFormat,
            search_GTE_LTE_queryTime_DATE_RANGE,
            cookie):
        '''检索'''
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_queryType':search_EQ_queryType,
            'search_EQ_source':search_EQ_source,
            'search_EQ_status':search_EQ_status,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE':search_GTE_LTE_queryTime_DATE_RANGE
        }
        req = Request(ServerUrl.ent_own_report_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def detail(cls,id,cookie):
        '''详情跳转'''
        params = {
            'id':id
        }
        req = Request(ServerUrl.ent_own_report_detail_url,params=params,headers=cookie)
        return req.get()

    @classmethod
    def findbyid(cls,id,cookie):
        '''详情'''
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_own_report_findbyid_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def exportload(cls,
                    search_EQ_enterpriseName,
                    search_EQ_signCode,
                    search_EQ_uniformSocialCredCode,
                    search_EQ_orgInstCode,
                    search_EQ_qryReason,
                    search_EQ_queryType,
                    search_EQ_source,
                    search_EQ_status,
                    search_EQ_queryFormat,
                    search_GTE_LTE_queryTime_DATE_RANGE,
                    ids,cookie):
        params = {
             'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_qryReason': search_EQ_qryReason,
            'search_EQ_queryType': search_EQ_queryType,
            'search_EQ_source': search_EQ_source,
            'search_EQ_status': search_EQ_status,
            'search_EQ_queryFormat': search_EQ_queryFormat,
            'search_GTE_LTE_queryTime_DATE_RANGE': search_GTE_LTE_queryTime_DATE_RANGE,
            'ids':ids

        }
        req = Request(ServerUrl.ent_own_report_exportload_url,params=params,headers=cookie)
        return req.get_download()

    @classmethod
    def getstatus(cls,id,cookie):
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_own_report_getstatus_url,params=data,headers=cookie)
        return req.post()





if __name__ == "__main__":
    pass